<?php
$customers = $this->controller->customers;
$name = !empty($_POST["name"]) ? $_POST["name"] : "";
$descr = !empty($_POST["descr"]) ? $_POST["descr"] : "";
$lin = !empty($_POST["link"]) ? $_POST["link"] : "";
?>
<form action="" method="post">
	<table class="box">
		<tr>
			<td colspan="2" class="title">Új projekt létrehozása</td>
		</tr>
		<tr>
			<td>Neve:</td><td><input type="text" name="name" value="<?= $name; ?>"></td>
		</tr>
		<tr>
			<td>Leírás:</td><td><input type="text" name="descr" value="<?= $descr; ?>"></td>
		</tr>
		<tr>
			<td>Link:</td><td><input type="text" name="link" value="<?= $lin; ?>"></td>
		</tr>
		<tr>
			<td>Megrendelő:</td>
			<td>
				<select name="customer">
					<option value="">Vállasszon...</option>
					<?php
						if($customers != null){
							for($i=0; $i<count($customers); $i++){
								print "<option value=\"".$customers[$i][0]."\">".$customers[$i][1]."</options>";
							}
						}
					?>
				</select> 
			</td>
		</tr>
		<tr>
			<td colspan="2" class="empty"><input type="submit" name="newproject" value="Létrehozás"></td>
		</tr>
	</table>
</from>